package com.liuguang.framework.utils;

public class CacheUserData extends CacheDataBase {
    public static final String ACCESS_TOKEN = "access_token";
    public static final String PERSON_ID = "personId";
    public static final String USER_INFO = "userInfo";
    public static CacheUserData cacheUserData = null;
    private static String spName = "user_";

    public String getSpName() {
        return spName;
    }

    public static void setSpName(String str) {
        spName = str;
    }

    public static CacheUserData getInstance() {
        CacheUserData cacheUserData2;
        if (cacheUserData != null) {
            return cacheUserData;
        }
        synchronized (CacheUserData.class) {
            if (cacheUserData == null) {
                cacheUserData = new CacheUserData();
            }
            cacheUserData2 = cacheUserData;
        }
        return cacheUserData2;
    }

    public String readToken() {
        return read("access_token");
    }

    public void keepToken(String str) {
        keep("access_token", str);
    }

    public void keepPersonID(String str) {
        keep(PERSON_ID, str);
    }

    public String readPersonID() {
        return read(PERSON_ID);
    }
}
